<script setup>
import { ref, reactive } from 'vue'
defineProps({
    visible: {
        type: Boolean,
        required: true,
    },
    activeData: {
        type: Object,
        default() {
            return null
        },
    },
})
const emits = defineEmits(['update:visible'])
function closeAction() {
    emits('update:visible', false)
}
const dataList = ref([{}])
function submitAction() {}

function msgChange(value, item) {}
function voiceChange(value, item) {}
</script>

<template>
    <el-dialog
        :model-value="visible"
        title="通知设置"
        width="500px"
        :draggable="true"
        @close="closeAction"
    >
        <div class="threshold">
            <el-table :data="dataList" style="width: 100%" v-loading="loading">
                <el-table-column prop="msgState" label="是否发送短信">
                    <template #default="scope">
                        <el-switch
                            v-model="scope.row.msgOpen"
                            @change="msgChange($event, scope.row)"
                        >
                        </el-switch>
                    </template>
                </el-table-column>
                <el-table-column prop="voiceState" label="是否发送语音">
                    <template #default="scope">
                        <el-switch
                            v-model="scope.row.voiceOpen"
                            @change="voiceChange($event, scope.row)"
                        >
                        </el-switch>
                        <!-- {{scope.row.voiceState == 1? '发送' : '不发送'}} -->
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </el-dialog>
</template>

<style lang="scss" scoped></style>
